10. PI Control

PI Control

Often there are very strict design requirements regarding the amount of steady-state error (SSE) that is tolerable, and you saw that proportional control alone is not adequate. So how can you eliminate, or at least reduce, the SSE? The answer is, add integral control!

Again, here is an intuitive description as to why it works. The basic idea is to increase the control input in relation to the total accumulated error. Thus, the integral controller takes into consideration all past system error values. The net effect is that even small errors will (eventually) be amplified and cause the controller to increase its input to the plant. This way, an integral controller can eliminate the small steady-state error that our proportional controller was prone to.

PV = Process Variable (i.e., measured output)
SP = Set Point (reference signal)

PV = Process Variable (i.e., measured output)
SP = Set Point (reference signal)

One thing you may be pondering at this point is how to actually implement the continuous time controller equation on a computer. After all, computers are discrete-time devices. For example, while you may see an automobile’s speed varying smoothly and continuously as it accelerates along a highway, as visualized by the top image below,

a computer only “sees” samples at periodic intervals, as shown in the lower image. Clearly, discrete-time approximations for both the integral and derivative are needed.

If you have ever taken a calculus class, you may recall that the integral term represents the area under curve. In the discrete time-case, this can be approximated as simply summing rectangles,

The “height” of the rectangle is error at each time point ( e_k) and the width is the time interval, Δt.

What you should recognize is that at each new time-step, all you have to do is compute the new error and add that to the running sum, i.e.,

As you can see, adding integral control can eliminate SSE but PI controllers have another benefit. Adding integral gain can act to smooth certain types of noise (i.e., fluctuating around a zero-mean value). However, like the proportional gain, you cannot make the integral gain arbitrarily large without consequence. If K_i is too large overcompensation can lead to instability through oscillations of increasing magnitude.